<?php

require_once  './include/common.inc.php';
$page_title = 'jans2en furniture - Setting';
$vNull = null;
$postiondiv=GetSettingPositionLink(null,null,null,&$vNull);
$baner_img='<div class="bigtitle">配套</div>';

$toUrl = 'product_photo_list.php?categoryid=%d&settingid=%d';
if ($jansen_type > 0 && $jansen_uid > 0) 
{	
	$toUrl = 'product_list.php?categoryid=%d&settingid=%d';
}

//$s = '';
//$ss ='';
//$cids = '';
//foreach($_categories as $k => $v)
//{
//	if($v["publish"]==0) continue;
//	$cids = '';
//	if(is_array($v["sub_cate"]) && count($v["sub_cate"]) >0)
//	{
//		$cids = GetCategoryIDS($v["sub_cate"]);		
//	}
//	if(strlen($cids)>0)
//		$cids = $cids.$v["id"];
//	else
//		$cids = $v["id"];
//
//	$s .= '<tr><td class="menu_list"><a href="javascript:CateMenuClick('.$v["id"].')">'.$v["name"].'</a>';
//	$sql = "SELECT ps.`id`, ps.`name` FROM `product` p,`p_setting` ps, `product_category` pc, `category` c WHERE pc.`category_id` IN(".$cids.") AND pc.`category_id` = c.`id` AND pc.`product_id`=p.`id` AND c.`publish`=1 AND ps.`id`=p.`setting_id` GROUP BY ps.`id`";
//	$query = $db->query($sql);
//	$ss = '';
//	while($rs = $db->fetch_array($query))
//	{
//		$ss .= '<tr><td class="menu_list_sub"><a href="'.sprintf($toUrl,$rs["id"],$v["id"]).'">&nbsp;&nbsp;&nbsp;&nbsp;'.$rs["name"].'</a></td></tr>';
//	}
//	if($ss !='')
//	{
//		$s .= '<table width="100%" border="0" cellSpacing="0" cellPadding="0" id="SubTb'.$v["id"].'" style="display:none;"><tbody>'.$ss.'</body></table>';
//	}
//	$s .= '</td></tr>';
//}
$arySetting = GetSettingAry();
$category_list = GetSettingMenu($arySetting,$toUrl,"","");

$ViewAllUrl = sprintf($toUrl,0,0);

// -------------- guideͼƬ start ----------------------------------------
$pic_ary = getSystemValue("");
$img1 = $pic_ary["picture_other_setting1en"];
$img2 = $pic_ary["picture_other_setting2en"];

if (trim($img1) == "" || !file_exists("attachments/system/" . $img1)) {
	$img1 = '<img src="attachments/noCN.gif" alt="" width="297" height="292"/>';
} else {
	$wh = "";
	$imgSize=getimagesize("attachments/system/".$img1);
	if($imgSize[0] > 370) $wh .= " width='370'";
	if($imgSize[1] > 370) $wh .= " height='370'";
	$img1 = '<img src="attachments/system/'.$img1.'"'.$wh.' alt=""/>';
}
if (trim($img2) == "" || !file_exists("attachments/system/" . $img2)) {
	$img2 = '<img src="attachments/noCN.gif" alt="" width="297" height="292"/>';
} else {
	$wh = "";
	$imgSize=getimagesize("attachments/system/".$img2);
	if($imgSize[0] > 370) $wh .= " width='370'";
	if($imgSize[1] > 370) $wh .= " height='370'";
	$img2 = '<img src="attachments/system/'.$img2.'"'.$wh.' alt=""/>';
}

// -------------- guideͼƬ end ----------------------------------------

require_once PrintEot('header3');
require_once PrintEot('setting');
require_once PrintEot('footer');

?>